package com.example.administrator.adc;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

public class ADC  extends AppCompatActivity implements View.OnClickListener{
    private Button button;
    private TextView textView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        button=(Button)this.findViewById(R.id.button);
        textView=(TextView)findViewById(R.id.textView2);
        ADCService._init();
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String str = ADCService._adc_on()*(3.3/4096)+"V";
                textView.setText(str);
            }
        });

    }
}